<?php

require_once '../funciones.php';
$con        = con_caweb();

$id = $_REQUEST['id'];


$SQL = "SELECT * FROM abonosfacturacion WHERE facturasistema=".$id." ORDER BY facturasistema";

$result = mysql_query( $SQL ) or die("Couldn?t execute query.".mysql_error());

if ( stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml") ) {
		  header("Content-type: application/xhtml+xml;charset=utf-8"); 
} else {
		  header("Content-type: text/xml;charset=utf-8");
}
echo "<?xml version='1.0' encoding='utf-8'?>";

echo "<rows>";
while($row = mysql_fetch_array($result,MYSQL_ASSOC)) {
	echo "<row>";			
	echo "<cell>". $row[tipo]."</cell>";
	echo "<cell>". $row[concepto]."</cell>";
	echo "<cell>". $row[sucursal]."</cell>";
	echo "<cell>". $row[valor]."</cell>";
	echo "<cell>". $row[fechacreo]."</cell>";
	echo "<cell>". $row[usuariocreo]."</cell>";
	echo "<cell>". $row[fechaabono]."</cell>";
	echo "<cell>". $row[estadocartera]."</cell>";
	echo "<cell>". $row[observacion]."</cell>";
	echo "</row>";
}
echo "</rows>";				

?>